import request from "../utils/request";
import type { loginParam, loginPostParam } from "./type";

enum API{
    // USERLOGIN_URL = "/user/login",
    // USERINFO_URL = "/user/info",
    USERLOGIN_URL = "/admin/acl/index/login",
    USERINFO_URL = "/admin/acl/index/info",
    USERLOGOUT_URL = "/admin/acl/index/logout",
}

export const reqUserLogin = (data:loginParam) => request.post<loginPostParam>(API.USERLOGIN_URL, data);
export const reqUserInfo = () => request.get(API.USERINFO_URL);
export const reqUserLogout = () => request.post(API.USERLOGOUT_URL);

export default {
    reqUserLogin,
    reqUserInfo,
    reqUserLogout
}